﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InfosView.aspx.cs" Inherits="Rison.Web.admin.InfosView" %>
<%@ Register src="../ascx/WebHeader.ascx" tagname="WebHeader" tagprefix="uc1" %>
<%@ Register src="../ascx/WebFooter.ascx" tagname="WebFooter" tagprefix="uc2" %>
<%@ Register src="../ascx/Navigation.ascx" tagname="Navigation" tagprefix="uc3" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>信息发布</title>
    <script type="text/javascript" src="../script/jquery-1.3.2.js"></script>
    <link href="../style/css/sysDefault.css" rel="stylesheet" type="text/css" enableviewstate="false" />
    <script type="text/javascript">
        function ChangePageIndex(value)
        {
            document.getElementById("hidCurPageIndex").value=value;
            document.forms[0].submit();
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <input type="hidden" id="hidCurPageIndex" name="hidCurPageIndex" runat="server" value="1" />
        <table cellpadding="1" cellspacing="1" border="0">
            <tr>
                <td><asp:Button ID="btnSearch" runat="server" Text="查询" onclick="btnSearch_Click" /></td>
                <td><asp:Button ID="btnAppend" runat="server" Text="添加" onclick="btnAppend_Click" /></td>
                <td><asp:Button ID="btnDelete" runat="server" Text="删除" onclick="btnDelete_Click"/></td>
                <td><asp:Label ID="labMsg" runat="server" ForeColor="Red"></asp:Label></td>
            </tr>
        </table>
        <asp:Panel ID="pnlCondition" runat ="server">
            <table>
                <tr>
                    <td>分类：</td>
                    <td><asp:DropDownList ID="drpCategory" runat="server"></asp:DropDownList></td>
                </tr>
            </table>
        </asp:Panel>
        <asp:GridView ID="gvData" runat="server" AllowPaging="True"  OnPageIndexChanging ="gvData_PageIndexChanging"
            AutoGenerateColumns="False" DataKeyNames="InfoID" PageSize="1" CellPadding="4" OnDataBound ="gvData_OnDataBound"
            ForeColor="#333333" GridLines="Both">
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <RowStyle BackColor="#EFF3FB" Height="28px" Font-Size="12px" />
            <Columns>
                <asp:TemplateField>
                    <ItemTemplate>
                        <asp:CheckBox id="chkSelect" runat="server" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="标题" HeaderStyle-Width="450px" ItemStyle-HorizontalAlign="Left">
                    <ItemTemplate>
                        <a href="InfomationEdit.aspx?key=<%# DataBinder.Eval(Container.DataItem, "InfoId")%>">
                            <asp:Label ID="Label1" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Subject")%>'></asp:Label></a>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="CreateTime" HeaderText="发布日期" HeaderStyle-Width="100px" DataFormatString="{0:yyyy-MM-dd}" />
            </Columns>
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White"  Height="28px"/>
            <EditRowStyle BackColor="#2461BF" />
            <AlternatingRowStyle BackColor="White" />
            <PagerTemplate>
                <table cellpadding="2" cellspacing="2" border="0">
                    <tr style="font-size:12px; font-family:宋体;">
                        <td><img alt="上一页" src="<%=UrlBase2 %>/style/image/page/prePage.jpg" onclick="ChangePageIndex('p');" style="width:46px;height:15px;border:0px; cursor:pointer;" /></td>
                        <td>共<asp:Label ID="labRowCount" runat="server">1</asp:Label>条信息</td>
                        <td>第<asp:Label ID="labCurrentPage" runat="server">1</asp:Label>页</td>                        
                        <td>共<asp:Label ID="labPageCount" runat="server">2</asp:Label>页</td>
                        <td><img alt="下一页" src="<%=UrlBase2 %>/style/image/page/nextPage.jpg" onclick="ChangePageIndex('n');" style="width:46px;height:15px;border:0px; cursor:pointer;" /></td>
                        <td valign="middle"><asp:TextBox ID="txtGo" runat="server" Width="21px" Height="12px" MaxLength="4"></asp:TextBox></td>
                        <td><img alt="Go" src="<%=UrlBase2 %>/style/image/page/go2.jpg" onclick="ChangePageIndex('g');" style="width:29px;height:18px;border:0px; cursor:pointer;" /></td>
                    </tr>
                </table>
            </PagerTemplate>
        </asp:GridView>
    </form>
</body>
</html>
